package com.vast.admin.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.vast.admin.entity.Contract;
import com.vast.admin.entity.statistics.MyContractStatisticsBean;
import com.vast.admin.entity.WechatContract;
import com.vast.admin.entity.dto.StatisticsContracts;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface ContractMapper extends BaseMapper<Contract> {

    StatisticsContracts getContractStatistics(@Param("completeId") long completeId);

    StatisticsContracts getContractStatisticsByCreateBy(@Param("managerId") long managerId);

    List<StatisticsContracts> getContractCompleteTopNum(int num);

    List<StatisticsContracts> getNearDateContractRecordsData(String startDate, String endDate);

    IPage<StatisticsContracts> getContractStatisticsByCompany(@Param("page") Page<StatisticsContracts> page, @Param("companyId") Long companyId, @Param("createById") Long createById);

    List<MyContractStatisticsBean> getContractByTemplateRecordId(@Param("managerId") Long managerId, @Param("companyIds") List<Long> companyIds, @Param("templateRecordId") Long templateRecordId, @Param("startDate") String startDate, @Param("endDate") String endDate);

    List<WechatContract> getWechatContractByCustomerId(Long customerId);


    IPage<Contract> queryContractList(@Param("page") Page<Contract> page, @Param("contract") Contract contract);



}